//
//  MineMeFocusTableViewCell.m
//  Tongcheng
//
//  Created by   丛熠超 on 2017/4/16.
//  Copyright © 2017年 Tongcheng. All rights reserved.
//

#import "MineMeFocusTableViewCell.h"
#import "UIImageView+AFNetworking.h"

@interface MineMeFocusTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *IconImageView;
@property (weak, nonatomic) IBOutlet UILabel *NameLB;
@property (weak, nonatomic) IBOutlet UILabel *AgeLB;
@property (weak, nonatomic) IBOutlet UILabel *PhotoNum;
@property (weak, nonatomic) IBOutlet UIButton *CancleFocusBtn;

@end

@implementation MineMeFocusTableViewCell

- (void)setModel:(MineFocusListModel *)model
{
    _model = model;
    [self.IconImageView setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:nil];
    self.NameLB.text = model.user_nicename;
    self.AgeLB.text = [NSString stringWithFormat:@"%@岁", model.age];
    self.PhotoNum.text = [NSString stringWithFormat:@"%@张", model.album];
}

- (void)setIsHidden:(BOOL)isHidden
{
    _isHidden = isHidden;
    self.CancleFocusBtn.hidden = isHidden;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (IBAction)CancleFocus:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(clickCancelFocusBtnWith:)]) {
        [self.delegate clickCancelFocusBtnWith:self];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
